<?php
include("banner.html");
include("dogs.php");

//Sjekk om man er logget inn
if(!isset($_SESSION['user'])){
die("Du er ikke logget inn...");
}

//Sjekk om man er admin..
if(!isset($_SESSION['admin'])){
	  // NSA WAS HERE
	  NSAlog($_SESSION['user'], "(!) Tried to reach admin.php");

die("Du er _IKKE_ admin! Brukernavn og IP logget");

}
?>
<!-- Bruker logget inn som admin -->
<div id="content">
<div id="profileinfo">
<h2>Adminverktøy</h2>
<a href="log.php">:: Log</a><br><a href="skingen.php">:: Tema Generator</a><br><br>
</div>
<div id="profileinfo">
<h2>Stats</h2>
<?php getStats(); ?>
</div>

<div id="profileinfo">
<h2>Legg til ny link</h2>

<form method="post" action="add.php" enctype="multipart/form-data">
<fieldset id="input">
	<input type="text" name="title" placeholder="Tittel" required>
	<input type="text" name="desc" placeholder="Beskrivelse" required>
	<input type="text" name="url" placeholder="URL (husk http://)" required>
	<select name="group" required>
	<option>Skole</option>
	<option>Fritid</option>
	<option>Uteliv</option>
	</select>
	Velg bilde<input type="file" name="file" id="file" required>
</fieldset>
<fieldset id="submit">
	<input type="submit" value="Save" name="save">
	</fieldset>
</div>
<div id="profileinfo">
	<h2>Slett fra databasen</h2>
<?php
editLinks();

?>


</div>







</body>
	<?php
	include ('info.html');
	?>
</html>
